<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <base href="<%=basePath%>">
    
    <title>${ webpageTitle }</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	
	<script src="rp/scripts/boot.js" type="text/javascript"></script>
	
	<style type="text/css">
	   	
    </style>
	
  </head>
  
  <body class="body-p5">
  	
  	<div id="menuItemForm">
  		<table border="0" cellpadding="1" cellspacing="2">
		    <tr>
		        <td>
		        	<label>菜单项名称：</label>
		        </td>
                <td>
                    <input name="text" class="mini-textbox" required="true" value="${ menuItem.text }"/>
                </td>
		    </tr>
		    <tr>
		        <td>
		        	<label>链接地址：</label>
		        </td>
                <td>
                    <input name="url" class="mini-textbox" value="${ menuItem.url }" style="width: 260px;"/>
                </td>
		    </tr>
		    <tr>
		    	<td></td>
		    	<td>
		    		<a class="mini-button" iconCls="icon-save" onclick="saveData()">提交</a>
		    	</td>
		    </tr>
		    
		</table>
  	</div>
  	
	<script type="text/javascript">
		$(function(){
			
		});
		
		function saveData(){
			var form = new mini.Form("#menuItemForm");            
			var data = form.getData();      //获取表单多个控件的数据
			var json = mini.encode(data);   //序列化成JSON
			$.ajax({
			    url: "rp/system/baseData/menuMng/saveMenuItem",
			    type: "post",
			    data: { data: json },
			    success: function (text) {
			        
			    }
			});
		}
	</script>
  </body>
</html>
